<div data-page="<{$pageName}>" class="page">
    <style type="text/css">
 #result,#CodeArea{border-top: 1px solid #c5c5c5;}
#CodeArea textarea {
    width: 100%;
    height: 100%;
    overflow: auto;
    border:none;
    border-right: 1px solid #c5c5c5;
    font: 14px "Courier New", Courier, monospace;
}
.show-div{ padding: 0px; }
.show-div h2{ font-size: 18px; padding-left: 10px }
    </style>
    <div class="page-content" style="background-color:#edeff0">
        <div class=" text" style="background:#fff; min-height: 300px;">
            <div class="row" style="margin:0px">
           
                <div class="col-md-6 show-div">
                 <div class="row" style="margin:0px">
                  <h2 class="s_left">编辑您的代码：</h2><a id="submit"  style="margin-right:50px" class="btn s_right btn-success border-radius-none mgt10">提交代码</a>
                </div>
                 <div id="CodeArea">
                      
 <textarea class="TestCode" id="logical" wrap="logical"><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>跟着大师兄学编程(www.boxphp.me)</title>
</head>
<body>
<{$data.content}>

</body>
</html>
</textarea>
                   </div>
                </div>
                <div class="col-md-6 show-div">
                  <h2>查看结果:</h2>
                    <div id="result">
                      <iframe class="TestCode" id="TestCodeiframe" width="100%" frameborder="0" name="i" src="/Group/show_tiy/name/<{$data.name}>"></iframe>
                         
                    </div>
                </div>
            </div>
        </div>
    </div>
    <script type="text/javascript">
    	$(function(){
    		if(view_type=="Wap"){
				$(".TestCode").height($(window).height()*0.6-80);
    		}else{
    			$(".TestCode").height($(window).height()-80);
    		}
    		
    
    		$("#submit").click(function(){
    			 var html=$("#logical").val();
    			$.post("/Group/setCode",{html:html},function(){
    				var src=$("#TestCodeiframe").attr("src");
    				$("#TestCodeiframe").attr("src",src);
    			})
    		})
    	})
    </script>
</div>
